package com.kanas.webak.admin.service;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import com.kanas.webak.admin.domain.AppUser;
import com.kanas.webak.rbac.domain.AppRole;
import com.kanas.webak.rbac.domain.AppUserRole;

public interface UserService {
	AppUser findOne(String userId);
	Page<AppUser> findAll(Pageable pageable);
	Page<AppUser> findByRole(Pageable pageable,String roleId);
	
	String delete(String uid)throws Exception;
	String update(String userId,AppUser user,String roleIds);
	String disable(String userId);
	String resetPassword(String uid)throws Exception;
	Long count();
	String addNew(AppUser user,String roleIds) throws Exception;
	String removeRole(AppUser u);
	String changePsd(String oldPsd, String newPsd) throws Exception;
	List<AppUserRole> findUserRoles(String id, String orgId);
	List<AppRole> findRoles(String id, String orgId);
}
